<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.ParseException"%>
<%@page import="com.tjsinfo.tjsoa.system.vo.User"%>
<%@page import="com.tjsinfo.tjsoa.schedule.vo.ScheduleMain"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String nowtime = (String) request.getAttribute("nowtime");
	User user = (User) session.getAttribute("user");
List sundaylist=(List)request.getAttribute("sundaylist");
List mondaylist=(List)request.getAttribute("mondaylist");
List tuesdaylist=(List)request.getAttribute("tuesdaylist");
List wednesdaylist=(List)request.getAttribute("wednesdaylist");
List thursdaylist=(List)request.getAttribute("thursdaylist");
List fridaylist=(List)request.getAttribute("fridaylist");
List saturdaylist=(List)request.getAttribute("saturdaylist");

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<style>
.lan01 {
	background: url(<%=basePath%>images/lanbg01.gif) no-repeat 0 0;
	width: 6px;
	height: 24px;
}

.lan02 {
	background: url(<%=basePath%>images/lanbg02.gif) repeat-x;
	width: 99%;
	height: 24px;
}

.lan03 {
	background: url(<%=basePath%>images/lanbg03.gif) no-repeat;
	width: 8px;
	height: 24px;
}

.cha {
	padding-top: 3px
}
</style>
		<base href="<%=basePath%>" />
		<title>粮油集团办公自动化协作平台</title>
		<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />
		<script language="javascript" type="text/javascript" src="<%=basePath%>My97DatePicker/WdatePicker.js"></script>
		<script type='text/javascript'src='<%=basePath%>dwr/interface/ScheduleMainBo.js'></script>
		<script type='text/javascript' src='<%=basePath%>dwr/engine.js'></script>
		<script type='text/javascript' src='<%=basePath%>dwr/util.js'></script>
		<link href="<%=basePath%>ajaxFramework/ext-2.1/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/ext-all.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/common/global/validator.js"></script>
		<style type="text/css">
td {
	font: 12px/ 170% "宋体", "新宋体", "黑体";
	color: #000
}

th {
	font: 12px/ 170% "宋体", "新宋体", "黑体";
	color: #000
}

.trBgColor {
	background-color: #A4D7E8;
	cursor: hand;
}
.GroupDiv {
	display: none;
	position: absolute;
	z-index: 1003
}
</style>

		<script type="text/javascript">
function deletefrom(userid){
			 Ext.MessageBox.confirm("OA办公自动化系统","您确定要删除该条记录?",function(btn){
			 	if(btn == 'yes')
			 	{
			 		var id=document.getElementById('dDate').value;
					 ScheduleMainBo.DeleteByIdshowDate(document.getElementById('content').value,document.getElementById('showDate').value,userid,{
					 	callback:function() {
					 		document.getElementById('newSchedule').style.display='none';
							document.getElementById(id).innerHTML='';
							document.getElementById('content').innerTEXT='';
							document.getElementById('yuan'+id).value='';
					 	}
					 });
			 	}
			 });
 		}
 		
		function newfrom(a,showDate,aa,day,week,ah)
	    {
	    document.getElementById('content').value='';
	       document.form1.startHour.value = a;
	       document.form1.dDate.value = ah;
	       document.form1.showDate.value=showDate;
	       document.form1.ah.value=ah;
	       document.getElementById('table').rows[0].cells[1].innerHTML=""+showDate+"&nbsp;&nbsp;"+week+"&nbsp;&nbsp;"+day+""+aa+"点";
	     
	       document.getElementById('content').value=document.getElementById('yuan'+ah).value;
		   document.getElementById('newSchedule').style.top =  document.body.clientHeight/5;
		   document.getElementById('newSchedule').style.left = document.body.clientWidth/5;
		   document.getElementById('newSchedule').style.display = "block";
	    }
		function newSchedule(userid)
	    {
		  if(isstringnull($("#content").text(),"内容不能为空"))
		   {
		 		if($("#content").text().length<400)
		 		{
		 			document.getElementById('yuan'+document.form1.dDate.value).value=document.getElementById('content').value;
			        if(document.getElementById('content').value.length>=5){
			     	document.getElementById(document.form1.dDate.value).innerHTML=document.getElementById('content').value.substring(0,15);
			     	}else
			     	{
			     	document.getElementById(document.form1.dDate.value).innerHTML=document.getElementById('content').value;
			     	}
			     	if(document.getElementById('startHour').value<7){
			     		document.getElementById('startHour').value = parseInt(document.getElementById('startHour').value)+24;
			     		
			     	}
					ScheduleMainBo.saveWeek(document.getElementById('content').value,document.getElementById('startHour').value,document.getElementById('showDate').value,userid);
					document.getElementById('newSchedule').style.display='none';
					document.getElementById('content').value='';
					window.location.reload(); 
		 		}
		     	else
		     	{
		     		Ext.MessageBox.alert('提示信息', '内容长度不能超过400');
		     	}
		   }
	    }
	   
	    function qxdeletefrom()
		{
			document.getElementById('newSchedule').style.display = "none";
		}
		</script>

	</head>
	<body>
		<div style="height: 97%;">
			<div id="rightindex">
				<div id="tabtj">
					<!--导航开始处-->
					<div id="indextit">
						日程安排
					</div>
					<div id="index_main">
					</div>
					<div id="workduty">
						<ul>
							<li class="s01">
								<a href="<%=basePath%>tjsinfo/tjsoa/schedule/schedule.do"><span>日安排</span>
								</a>
							</li>
							<li class="s01">
								<a
									href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeeks.do?time=<%=nowtime%>'><span>周安排</span>
								</a>
							</li>
							
						</ul>
					</div>

					<div class="contab01" style="height: 89.5%" id="div3">
						<table width="100%">
							<tr>
								<td>
									<table width="100%">
										<tr>
											<td width="12%" style="background-color:#C3D9FF">
												&nbsp;
											</td>
											<td width="12%" align="center" style="background-color:#C3D9FF">
												<%
													String sunday = (String) request.getAttribute("sunday");
													Date sundaydate = null;
													SimpleDateFormat simpleDateFormat=new SimpleDateFormat("MM/dd");
													SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
													try {
														sundaydate = dateFormat.parse(sunday);
													} catch (ParseException e) {

													}
												String 	sundaydatemmdd	=simpleDateFormat.format(sundaydate);
													Calendar cdsunday = Calendar.getInstance();
													cdsunday.setTime(sundaydate);
													int mysundaydate = cdsunday.get(Calendar.DAY_OF_WEEK);
													String sundayDate = "";
													switch (mysundaydate) {
													case 1:
														sundayDate = "周日";
														break;
													case 2:
														sundayDate = "周一";
														break;
													case 3:
														sundayDate = "周二";
														break;
													case 4:
														sundayDate = "周三";
														break;
													case 5:
														sundayDate = "周四";
														break;
													case 6:
														sundayDate = "周五";
														break;
													default:
														sundayDate = "周六";
														break;
													}
												%>
									<a
										href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeekDay.do?time=<%=sunday%>'><span><font color=112ABB><%=sundaydatemmdd%>&nbsp;(<%=sundayDate%>)</font></span>
									</a>
												
											</td>
											<td width="12%"align="center" style="background-color:#C3D9FF" >
												<%
													String monday = (String) request.getAttribute("monday");
													Date mondaydate = null;
													try {
														mondaydate = dateFormat.parse(monday);
													} catch (ParseException e) {

													}
												String mondaydatemmdd=	simpleDateFormat.format(mondaydate);
													Calendar cdmonday = Calendar.getInstance();
													cdmonday.setTime(mondaydate);
													int mymondaydate = cdmonday.get(Calendar.DAY_OF_WEEK);
													String mondaydates = "";
													switch (mymondaydate) {
													case 1:
														mondaydates = "周日";
														break;
													case 2:
														mondaydates = "周一";
														break;
													case 3:
														mondaydates = "周二";
														break;
													case 4:
														mondaydates = "周三";
														break;
													case 5:
														mondaydates = "周四";
														break;
													case 6:
														mondaydates = "周五";
														break;
													default:
														mondaydates = "周六";
														break;
													}
												%>
												<a
										href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeekDay.do?time=<%=monday%>'><span><font color=112ABB><%=mondaydatemmdd%>&nbsp;(<%=mondaydates%>)</font></span>
									</a>
												
											</td>
											<td width="12%"align="center"  style="background-color:#C3D9FF">
												<%
													String tuesday = (String) request.getAttribute("tuesday");
													Date tuesdaydate = null;
													try {
														tuesdaydate = dateFormat.parse(tuesday);
													} catch (ParseException e) {

													}
												String tuesdaydatemmdd=simpleDateFormat.format(tuesdaydate);
													Calendar cdtuesday = Calendar.getInstance();
													cdtuesday.setTime(tuesdaydate);
													int mytuesdaydate = cdtuesday.get(Calendar.DAY_OF_WEEK);
													String tuesdaydates = "";
													switch (mytuesdaydate) {
													case 1:
														tuesdaydates = "周日";
														break;
													case 2:
														tuesdaydates = "周一";
														break;
													case 3:
														tuesdaydates = "周二";
														break;
													case 4:
														tuesdaydates = "周三";
														break;
													case 5:
														tuesdaydates = "周四";
														break;
													case 6:
														tuesdaydates = "周五";
														break;
													default:
														tuesdaydates = "周六";
														break;
													}
												%>
																							<a
										href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeekDay.do?time=<%=tuesday%>'><span><font color=112ABB><%=tuesdaydatemmdd%>&nbsp;(<%=tuesdaydates%>)</font></span>
									</a>
												
											</td>
											<td width="12%"align="center" style="background-color:#C3D9FF" >
												<%
													String wednesday = (String) request.getAttribute("wednesday");
													Date wednesdaydate = null;
													try {
														wednesdaydate = dateFormat.parse(wednesday);
													} catch (ParseException e) {

													}
												String 	simpleDateFormatmmdd=simpleDateFormat.format(wednesdaydate);
													Calendar cdwednesday = Calendar.getInstance();
													cdwednesday.setTime(wednesdaydate);
													int mywednesdaydate = cdwednesday.get(Calendar.DAY_OF_WEEK);
													String wednesdaydates = "";
													switch (mywednesdaydate) {
													case 1:
														wednesdaydates = "周日";
														break;
													case 2:
														wednesdaydates = "周一";
														break;
													case 3:
														wednesdaydates = "周二";
														break;
													case 4:
														wednesdaydates = "周三";
														break;
													case 5:
														wednesdaydates = "周四";
														break;
													case 6:
														wednesdaydates = "周五";
														break;
													default:
														wednesdaydates = "周六";
														break;
													}
												%>
										<a
										href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeekDay.do?time=<%=wednesday%>'><span><font color=112ABB><%=simpleDateFormatmmdd%>&nbsp;(<%=wednesdaydates%>)</font></span>
									</a>
												
											</td>
											<td width="12%" align="center" style="background-color:#C3D9FF" >
												<%
													String thursday = (String) request.getAttribute("thursday");
													Date thursdaydate = null;
													try {
														thursdaydate = dateFormat.parse(thursday);
													} catch (ParseException e) {

													}
												String thursdaydatemmdd=simpleDateFormat.format(thursdaydate);
													Calendar cdthursday = Calendar.getInstance();
													cdthursday.setTime(thursdaydate);
													int mythursdaydate = cdthursday.get(Calendar.DAY_OF_WEEK);
													String thursdaydates = "";
													switch (mythursdaydate) {
													case 1:
														thursdaydates = "周日";
														break;
													case 2:
														thursdaydates = "周一";
														break;
													case 3:
														thursdaydates = "周二";
														break;
													case 4:
														thursdaydates = "周三";
														break;
													case 5:
														thursdaydates = "周四";
														break;
													case 6:
														thursdaydates = "周五";
														break;
													default:
														thursdaydates = "周六";
														break;
													}
												%>
														<a
										href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeekDay.do?time=<%=thursday%>'><span><font color=112ABB><%=thursdaydatemmdd%>&nbsp;(<%=thursdaydates%>)</font></span>
									</a>
												
											</td>
											<td width="12%" align="center" style="background-color:#C3D9FF">
												<%
													String friday = (String) request.getAttribute("friday");
													Date fridaydate = null;
													try {
														fridaydate = dateFormat.parse(friday);
													} catch (ParseException e) {

													}
												String fridaydatemmdd=	simpleDateFormat.format(fridaydate);
													Calendar cdfriday = Calendar.getInstance();
													cdfriday.setTime(fridaydate);
													int myfridaydate = cdfriday.get(Calendar.DAY_OF_WEEK);
													String fridaydates = "";
													switch (myfridaydate) {
													case 1:
														fridaydates = "周日";
														break;
													case 2:
														fridaydates = "周一";
														break;
													case 3:
														fridaydates = "周二";
														break;
													case 4:
														fridaydates = "周三";
														break;
													case 5:
														fridaydates = "周四";
														break;
													case 6:
														fridaydates = "周五";
														break;
													default:
														fridaydates = "周六";
														break;
													}
												%>
																	<a
										href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeekDay.do?time=<%=friday%>'><span><font color=112ABB><%=fridaydatemmdd%>&nbsp;(<%=fridaydates%>)</font></span>
									</a>
												
											</td>
											<td width="12%" align="center" style="background-color:#C3D9FF" >
												<%
													String saturday = (String) request.getAttribute("saturday");
													Date saturdaydate = null;
													try {
														saturdaydate = dateFormat.parse(saturday);
													} catch (ParseException e) {

													}
												String saturdaydatemmdd=	simpleDateFormat.format(saturdaydate);
													Calendar cdsaturday = Calendar.getInstance();
													cdfriday.setTime(saturdaydate);
													int mysaturdaydate = cdfriday.get(Calendar.DAY_OF_WEEK);
													String saturdaydates = "";
													switch (mysaturdaydate) {
													case 1:
														saturdaydates = "周日";
														break;
													case 2:
														saturdaydates = "周一";
														break;
													case 3:
														saturdaydates = "周二";
														break;
													case 4:
														saturdaydates = "周三";
														break;
													case 5:
														saturdaydates = "周四";
														break;
													case 6:
														saturdaydates = "周五";
														break;
													default:
														saturdaydates = "周六";
														break;
													}
												%>
																				<a
										href='<%=basePath%>/tjsinfo/tjsoa/schedule/scheduleWeekDay.do?time=<%=saturday%>'><span><font color=112ABB><%=saturdaydatemmdd%>&nbsp;(<%=saturdaydates%>)</font></span>
									</a>
												
											</td>
										</tr>
									</table>
								<div id="div2"
										style="height: 460px; overflow-x: hidden; overflow-y: scroll;" />

										<table width="100%" border="1" bordercolor="#DDDDDD">
											<%
												int a = 7;
												String conn="";
												int  d=0;
												int a1=0;
												int a2=0;
												int a3=0;
												int a4=0;
												int a5=0;
												int a6=0;
												for (int b = 7; b <= 30; b++) {
											%>
											<%
													String day = "上午";
													int aa = a;
													if (a > 12) {
														day = "下午";
														aa = a - 12;
													}
													if (a > 24) {
														day = "上午";
														aa = a - 24;
													}
											%>
											<tr>
												<td width="12%" align="center" style="background-color:#E8EEF7"><font color=446688><%=day%><%=aa%>点</font></td>
												<%
												
												for (int t = 1; t <= 7; t++) {
												%>
												<!-- 7 -->
												<%if(mysundaydate==t){ %>
												
												<%if(sundaylist == null ||d>=sundaylist.size()){%>
												<td width="12%" align="center" >
												<div id="<%=t%><%=b%>" onclick="newfrom(<%=a%>,'<%=sunday%>',<%=aa%>,'<%=day %>','<%=sundayDate%>','<%=t%><%=b%>')"	style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
												</td>
												
												
										
												<% }else{ 
												
													ScheduleMain main = (ScheduleMain) sundaylist.get(d);
													if (b == Integer.valueOf(main.getScheduleHour())) {
																	d++;
														 conn = main.getContent();
															String s1 = "<br/>";
															String s2 = conn.replaceAll(s1, "\r\n");
															main.setContent(s2);
															conn=s2;
															if(main.getContent().length()>=5){
																conn=main.getContent().substring(0,5);
																
														}
														
												 
												 %>
												 	<td width="12%" align="center">
													<div id="<%=t%><%=b%>" style="background-color:#FFFFCC"
														onclick="newfrom(<%=a%>,'<%=sunday%>',<%=aa%>,'<%=day %>','<%=sundayDate%>','<%=t%><%=b%>')" style="width: 100%">
														<a title="<%=main.getContent()%>"><%=conn%></a>
													</div>
													
													<input type="hidden" id="yuan<%=t%><%=b%>"
														value="<%=main.getContent() %>" />
												</td>
													<%
														} else {
													%>
													<td width="12%" align="center">
													<div id="<%=t%><%=b%>"
														onclick="newfrom('<%=a%>','<%=sunday%>',<%=aa%>,'<%=day %>','<%=sundayDate%>','<%=t%><%=b%>')"
														style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
													</td>
													<%
														}
													}
													
													}
													%>
												<!-- 1 -->
											
												<%if(mymondaydate==t){ %>
								
												<%if(mondaylist == null ||a1>=mondaylist.size()){%>
												<td width="12%" align="center" bordercolor="#DDDDDD">
												<div id="<%=t%><%=b%>" onclick="newfrom(<%=a%>,'<%=monday%>',<%=aa%>,'<%=day %>','<%=mondaydates %>','<%=t%><%=b%>')"	style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
												</td>
												<% }else{ 
												
													ScheduleMain main = (ScheduleMain) mondaylist.get(a1);
													if (b == Integer.valueOf(main.getScheduleHour())) {
																	a1++;
																	 conn= main.getContent();
															String s1 = "<br/>";
															String s2 = conn.replaceAll(s1, " ");
															main.setContent(s2);
															conn=s2;
														 		conn = main.getContent();
															if(main.getContent().length()>=5){
																conn=main.getContent().substring(0,5);
														
														}
												 %>
											 <td width="12%" align="center">
													<div id="<%=t%><%=b%>" style="background-color:#FFFFCC"
														onclick="newfrom(<%=a%>,'<%=monday%>',<%=aa%>,'<%=day %>','<%=mondaydates%>','<%=t%><%=b%>')" style="width: 100%">
														<a title="<%=main.getContent()%>"><%=conn%></a>
													</div>
													
													<input type="hidden" id="yuan<%=t%><%=b%>"
														value="<%=main.getContent() %>" />
												</td>
													<%
														} else {
													%>
													<td width="12%" align="center">
													<div id="<%=t%><%=b%>"
														onclick="newfrom('<%=a%>','<%=monday%>',<%=aa%>,'<%=day %>','<%=mondaydates%>','<%=t%><%=b%>')"
														style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
													</td>
													<%
													}
													}
													
													}
													%>
											
											
												<!-- 2 -->
													<%if(mytuesdaydate==t){ %>

											<%if(tuesdaylist == null ||a2>=tuesdaylist.size()){%>
												<td width="12%" align="center">
												<div id="<%=t%><%=b%>" onclick="newfrom(<%=a%>,'<%=tuesday%>',<%=aa%>,'<%=day %>','<%=tuesdaydates %>','<%=t%><%=b%>')"	style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
												</td>
												<% }else{ 
												
													ScheduleMain main = (ScheduleMain) tuesdaylist.get(a2);
													if (b == Integer.valueOf(main.getScheduleHour())) {
																	a2++;
														 				 conn= main.getContent();
															String s1 = "<br/>";
															String s2 = conn.replaceAll(s1, " ");
															main.setContent(s2);
															conn=s2;
															if(main.getContent().length()>=5){
																conn=main.getContent().substring(0,5);
														
														}
												 %>
											 <td width="12%" align="center">
													<div id="<%=t%><%=b%>" style="background-color:#FFFFCC"
														onclick="newfrom(<%=a%>,'<%=tuesday%>',<%=aa%>,'<%=day %>','<%=tuesdaydates%>','<%=t%><%=b%>')" style="width: 100%">
														<a title="<%=main.getContent()%>"><%=conn%></a>
													</div>
													
													<input type="hidden" id="yuan<%=t%><%=b%>"
														value="<%=main.getContent() %>" />
												</td>
													<%
														} else {
													%>
													<td width="12%" align="center">
													<div id="<%=t%><%=b%>"
														onclick="newfrom('<%=a%>','<%=tuesday%>',<%=aa%>,'<%=day %>','<%=tuesdaydates%>','<%=t%><%=b%>')"
														style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
													</td>
													<%
													}
													}
													
													}
													%>
													<!-- 3 -->
													
													
													<%if(mywednesdaydate==t){ %>
										
													<%if(wednesdaylist == null ||a3>=wednesdaylist.size()){%>
												<td width="12%" align="center">
												<div id="<%=t%><%=b%>" onclick="newfrom(<%=a%>,'<%=wednesday%>',<%=aa%>,'<%=day %>','<%=wednesdaydates %>','<%=t%><%=b%>')"	style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
												</td>
												<% }else{ 
												
													ScheduleMain main = (ScheduleMain) wednesdaylist.get(a3);
													if (b == Integer.valueOf(main.getScheduleHour())) {
																	a3++;
														 				 conn= main.getContent();
															String s1 = "<br/>";
															String s2 = conn.replaceAll(s1, " ");
															main.setContent(s2);
															conn=s2;
															if(main.getContent().length()>=5){
																conn=main.getContent().substring(0,5);
														
														}
												 %>
											 <td width="12%" align="center">
													<div id="<%=t%><%=b%>" style="background-color:#FFFFCC"
														onclick="newfrom(<%=a%>,'<%=wednesday%>',<%=aa%>,'<%=day %>','<%=wednesdaydates%>','<%=t%><%=b%>')" style="width: 100%">
														<a title="<%=main.getContent()%>"><%=conn%></a>
													</div>
													
													<input type="hidden" id="yuan<%=t%><%=b%>"
														value="<%=main.getContent() %>" />
												</td>
													<%
														} else {
													%>
													<td width="12%" align="center">
													<div id="<%=t%><%=b%>"
														onclick="newfrom('<%=a%>','<%=wednesday%>',<%=aa%>,'<%=day %>','<%=wednesdaydates%>','<%=t%><%=b%>')"
														style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
													</td>
													<%
													}
													}
													
													}
													%>
												<!-- 4 -->
								<%if(mythursdaydate==t){ %>
											<%if(thursdaylist == null ||a4>=thursdaylist.size()){%>
													<td width="12%" align="center">
												<div id="<%=t%><%=b%>" onclick="newfrom(<%=a%>,'<%=thursday%>',<%=aa%>,'<%=day %>','<%=thursdaydates%>','<%=t%><%=b%>')"	style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
												</td>
												<% }else{ 
												
													ScheduleMain main = (ScheduleMain) thursdaylist.get(a4);
													if (b == Integer.valueOf(main.getScheduleHour())) {
																	a4++;
														 				 conn= main.getContent();
															String s1 = "<br/>";
															String s2 = conn.replaceAll(s1, " ");
															main.setContent(s2);
															conn=s2;
															if(main.getContent().length()>=5){
																conn=main.getContent().substring(0,5);
														
														}
												 %>
											 <td width="12%" align="center">
													<div id="<%=t%><%=b%>" style="background-color:#FFFFCC"
														onclick="newfrom(<%=a%>,'<%=thursday%>',<%=aa%>,'<%=day %>','<%=thursdaydates%>','<%=t%><%=b%>')" style="width: 100%">
														<a title="<%=main.getContent()%>"><%=conn%></a>
													</div>
													
													<input type="hidden" id="yuan<%=t%><%=b%>"
														value="<%=main.getContent() %>" />
												</td>
													<%
														} else {
													%>
													<td width="12%" align="center">
													<div id="<%=t%><%=b%>"
														onclick="newfrom('<%=a%>','<%=thursday%>',<%=aa%>,'<%=day %>','<%=thursdaydates%>','<%=t%><%=b%>')"
														style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
													</td>
													<%
													}
													}
													
													}
													%>
												<!-- 5 -->
												<%if(myfridaydate==t){ %>
												<%if(fridaylist == null ||a5>=fridaylist.size()){%>
													<td width="12%" align="center">
												<div id="<%=t%><%=b%>" onclick="newfrom(<%=a%>,'<%=friday%>',<%=aa%>,'<%=day %>','<%=fridaydates%>','<%=t%><%=b%>')"	style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
												</td>
												<% }else{ 
												
													ScheduleMain main = (ScheduleMain) fridaylist.get(a5);
													if (b == Integer.valueOf(main.getScheduleHour())) {
																	a5++;
														 				 conn= main.getContent();
															String s1 = "<br/>";
															String s2 = conn.replaceAll(s1, " ");
															main.setContent(s2);
															conn=s2;
															if(main.getContent().length()>=5){
																conn=main.getContent().substring(0,5);
														
														}
												 %>
											 <td width="12%" align="center">
													<div id="<%=t%><%=b%>" style="background-color:#FFFFCC"
														onclick="newfrom(<%=a%>,'<%=friday%>',<%=aa%>,'<%=day %>','<%=fridaydates%>','<%=t%><%=b%>')" style="width: 100%">
														<a title="<%=main.getContent()%>"><%=conn%></a>
													</div>
													
													<input type="hidden" id="yuan<%=t%><%=b%>"
														value="<%=main.getContent() %>" />
												</td>
													<%
														} else {
													%>
													<td width="12%" align="center">
													<div id="<%=t%><%=b%>"
														onclick="newfrom('<%=a%>','<%=friday%>',<%=aa%>,'<%=day %>','<%=fridaydates%>','<%=t%><%=b%>')"
														style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
													</td>
													<%
													}
													}
													
													}
													%>
										
												<!-- 6 -->
													<%if(mysaturdaydate==t){ %>
													<%if(saturdaylist == null ||a6>=saturdaylist.size()){%>
													<td width="12%" align="center">
												<div id="<%=t%><%=b%>" onclick="newfrom(<%=a%>,'<%=saturday%>',<%=aa%>,'<%=day %>','<%=saturdaydates%>','<%=t%><%=b%>')"	style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
												</td>
												<% }else{ 
												
													ScheduleMain main = (ScheduleMain) saturdaylist.get(a6);
													if (b == Integer.valueOf(main.getScheduleHour())) {
																	a6++;
														 				 conn= main.getContent();
															String s1 = "<br/>";
															String s2 = conn.replaceAll(s1, " ");
															main.setContent(s2);
															conn=s2;
															if(main.getContent().length()>=5){
																conn=main.getContent().substring(0,5);
														
														}
												 %>
											 <td width="12%" align="center">
													<div id="<%=t%><%=b%>" style="background-color:#FFFFCC"
														onclick="newfrom(<%=a%>,'<%=saturday%>',<%=aa%>,'<%=day %>','<%=saturdaydates%>','<%=t%><%=b%>')" style="width: 100%">
														<a title="<%=main.getContent()%>"><%=conn%></a>
													</div>
													
													<input type="hidden" id="yuan<%=t%><%=b%>"
														value="<%=main.getContent() %>" />
												</td>
													<%
														} else {
													%>
													<td width="12%" align="center">
													<div id="<%=t%><%=b%>"
														onclick="newfrom('<%=a%>','<%=saturday%>',<%=aa%>,'<%=day %>','<%=saturdaydates%>','<%=t%><%=b%>')"
														style="width: 100%">
														&nbsp;
													</div>
													<input type="hidden" id="yuan<%=t%><%=b%>" />
													</td>
													<%
													}
													}
													
													}
													%>
												<%
												}
												%>
											</tr>
											<%
											a++;
											%>
											<%
											}
											%>


										</table>
								<td width="15%" valign="top">
									<table>
										<tr>
											<td align="right">
												<div id="div1"></div>
											</td>
										<tr>
									</table>
								</td>
							</tr>
						</table>
					
							</div>
							</div>
							</div>
							</div>
		
			<form name="form1" method="post" id="form1">
			<div class="GroupDiv"
				id="newSchedule">
				<table width="478" border="0" cellpadding="0" cellspacing="0" >
					<tr>
						<td>
							<table width="100%" border="0" cellspacing="0" cellpadding="0" >
								<tr>
									<td class="lan01">
										&nbsp;
									</td>
									<td class="lan02">
										<table width="99%" border="0" cellspacing="0" cellpadding="0" id="table">
											<tr>
												<td width="5%" align="center" style="padding-top: 3px;">
													
												</td>
												<td width="89%" align="left"
													style="color: #FFFFFF; font-weight: bold; padding-top: 3px;">
													
												</td>
												<td width="6%">
													<div class="cha">
														<a href="javascript:qxdeletefrom()"><img
																src="<%=basePath%>images/cha.gif" /> </a>
													</div>
												</td>
											</tr>
										</table>
									</td>
									<td class="lan03">
										&nbsp;
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td height="109" class="zz">
							<table width="400" border="0" cellspacing="0" cellpadding="0"
								class="researchtab">
								<tr>
									<td width="15%" align="center">
										<img src="<%=basePath%>images/bjicon.jpg" />
									</td>
									<td width="83%" align="left">
										<textarea rows="15" cols="50" name="content" id="content"></textarea>
									</td>
								</tr>
								<tr>
									<td align="center" colspan="2"
										style="border-top: 1px #CFCFD1 solid">

										<a href="javascript:newSchedule('<%=user.getUser_id()%>')"
											style="display: inline"><img style="display: inline"
												src="<%=basePath%>images/qd.gif" />
										</a>

										<a href="javascript:deletefrom('<%=user.getUser_id()%>')"
											style="display: inline"><img style="display: inline"
												src="<%=basePath%>images/shanchu.gif" />
										</a>

										<a href="javascript:qxdeletefrom()" style="display: inline"><img
												style="display: inline" src="<%=basePath%>images/qx.gif" />
										</a>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
			<input type="hidden" name="startHour" value="" />
			<input type="hidden" name="showDate" value="" />
			<input type="hidden" name="dDate" value="" />
			<input type="hidden" name="ah" value="" />

		</form>
		<script>
			var ieheight=document.getElementById("div3").offsetHeight; 
			document.getElementById("div2").style.height=ieheight-40;
			document.getElementById("div3").style.height=ieheight-10;
			WdatePicker({eCont:'div1',startDate:'<%=nowtime%>',onpicked:function(dp){window.location.href='<%=basePath%>tjsinfo/tjsoa/schedule/scheduleWeek.do?time='+dp.cal.getDateStr()+''}})
	</script>
	</body>
</html>
